<script lang="ts">
export default {
  name: 'Study8SonDemo3'
}
</script>

<template>
  <div>
    <p>子组件绑定的值：{{ mVal }}</p>
    <input type="text" v-model="mVal" />
  </div>
</template>

<script setup lang="ts">
// 不用defineProps传值，直接定义defineModel
const mVal = defineModel()
</script>

<style scoped>
body {
  padding: 20px;
}
h2 {
  color: red;
}
h3 {
  color: rgb(220, 85, 85);
}
h4 {
  color: skyblue;
}
.hr-style {
  border: 3px solid gold;
  margin: 20px 0;
}
.group {
  border: 4px solid rgb(102, 215, 85);
  margin: 10px;
  padding: 10px;
}
.group3 {
  border: 2px solid rgb(64, 163, 199);
  margin: 10px;
  padding: 10px;
}
.note {
  margin: 10px;
  padding: 10px;
  border: 3px solid rgb(221, 121, 202);
}
.note p {
  color: rgb(226, 106, 204);
  font-weight: bold;
}
</style>
